#include<iostream>
#include"EquationSolver.h"
#include<cmath>
#include<limits>

double Function::operator()(double _x)
{
  return (0.5*M_PI-asin(_x)-_x*pow(1-_x*_x,0.5)-1.24);
}

double Function::diff(double _x)
{
  return ((2*_x*_x-2)/(pow(1-_x*_x,0.5)));
}

int main(){
  Function f;
  Bisection Bis( 0, 0.2, 0.000001, 1000, f);
  Bis.solve();
  Newton New( 0.166166, 100, f);
  New.solve();
  Secant Sec( 0, 0.2, 0.000001, 1000, f);
  Sec.solve();
  return 0;
}
